/*
 	PureMVC UnifiedLoader Utility
 	Copyright (c) 2008 neil manuell
  	Your reuse is governed by the Creative Commons Attribution 3.0 License
 */
 package org.puremvc.as3.multicore.utilities.unifiedloader.events
{
	import flash.events.Event;
	
	public class LoaderEvent extends Event
	{
		public static const QUEUE_COMPLETED:String = "loadQueueCompleted";
		
		public static const QUEUE_PROGRESS:String = "loadQueueProgress";
		
		public static const ITEM_STARTED:String = "loadItemStarted";
		
		public static const ITEM_COMPLETED:String = "loadItemCompleted";
		
		private var mCurrentItemBytesLoaded:Number;
		private var mCurrentItemBytesTotal:Number;
		private var mCurrentItemURL:String;
		private var mTotalItems:uint;
		private var mItemsLeft:uint;
		private var mQueueLoadProgress:Number;

		
		

        // Public constructor.
        public function LoaderEvent(	type:String,
        									bytesLoaded:Number = 0,
        									bytesTotal:Number = 0,
        									url:String = "",
        									totalItems:uint  = 0,
	        								itemsLeft:uint = 0,
	        								queueProgress:Number = 0	
	        							) 
	    {
            
            super(type);
            
	        mCurrentItemBytesLoaded = bytesLoaded
			mCurrentItemBytesTotal = bytesTotal
			mCurrentItemURL = url;
			mTotalItems = totalItems;
			mItemsLeft = itemsLeft;
			mQueueLoadProgress = queueProgress;
	    }
		
    
        
        
        public function get currentItemBytesLoaded():Number{
			return mCurrentItemBytesLoaded;
		}
		
		public function get currentItemBytesTotal():Number{
			return mCurrentItemBytesTotal;
		}
		
		public function get currentItemURL():String{
			return mCurrentItemURL;
		}
		
		public function get totalNumbItems():int{
			return mTotalItems;
		}
		
		public function get numbItemsLeft():int{
			return mItemsLeft;
		}
		
		
		public function get queueLoadProgress():Number{
			return mQueueLoadProgress;
		}
		


      

        // Override the inherited clone() method.
        override public function clone():Event {
            return new LoaderEvent(type);
        }
    }

}